<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title data-zh="专业电器设备 - ElectroTech Pro" data-en="Professional Electronics - ElectroTech Pro">专业电器设备 - ElectroTech Pro</title>
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            line-height: 1.6;
            color: #333;
            overflow-x: hidden;
        }

        /* Header */
        .header {
            background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
            color: white;
            padding: 1rem 0;
            position: fixed;
            width: 100%;
            top: 0;
            z-index: 1000;
            backdrop-filter: blur(10px);
            transition: all 0.3s ease;
        }

        .header.scrolled {
            background: rgba(30, 60, 114, 0.95);
            padding: 0.5rem 0;
        }

        .nav-container {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 2rem;
        }

        .logo {
            font-size: 1.8rem;
            font-weight: bold;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .nav-menu {
            display: flex;
            list-style: none;
            gap: 2rem;
            align-items: center;
        }

        .nav-menu a {
            color: white;
            text-decoration: none;
            transition: all 0.3s ease;
            padding: 0.5rem 1rem;
            border-radius: 5px;
        }

        .nav-menu a:hover {
            background: rgba(255, 255, 255, 0.1);
            transform: translateY(-2px);
        }

        .lang-switch {
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.3);
            color: white;
            padding: 0.5rem 1rem;
            border-radius: 25px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .lang-switch:hover {
            background: rgba(255, 255, 255, 0.2);
            transform: scale(1.05);
        }

        /* Hero Section */
        .hero {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            color: white;
            position: relative;
            overflow: hidden;
        }

        .hero::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
            animation: float 20s ease-in-out infinite;
        }

        @keyframes float {
            0%, 100% { transform: translateY(0px); }
            50% { transform: translateY(-20px); }
        }

        .hero-content {
            max-width: 800px;
            z-index: 2;
            position: relative;
        }

        .hero h1 {
            font-size: 3.5rem;
            margin-bottom: 1rem;
            animation: slideInUp 1s ease-out;
        }

        .hero p {
            font-size: 1.3rem;
            margin-bottom: 2rem;
            animation: slideInUp 1s ease-out 0.3s both;
        }

        .cta-button {
            background: linear-gradient(45deg, #ff6b6b, #ee5a24);
            color: white;
            padding: 1rem 2rem;
            border: none;
            border-radius: 50px;
            font-size: 1.1rem;
            cursor: pointer;
            transition: all 0.3s ease;
            animation: slideInUp 1s ease-out 0.6s both;
            text-decoration: none;
            display: inline-block;
        }

        .cta-button:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 25px rgba(255, 107, 107, 0.3);
        }

        @keyframes slideInUp {
            from {
                opacity: 0;
                transform: translateY(50px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* Products Section */
        .products {
            padding: 5rem 0;
            background: #f8f9fa;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 2rem;
        }

        .section-title {
            text-align: center;
            font-size: 2.5rem;
            margin-bottom: 3rem;
            color: #2c3e50;
        }

        .products-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 2rem;
            margin-bottom: 3rem;
        }

        .product-card {
            background: white;
            border-radius: 15px;
            padding: 2rem;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .product-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
        }

        .product-icon {
            font-size: 3rem;
            color: #3498db;
            margin-bottom: 1rem;
        }

        .product-card h3 {
            font-size: 1.5rem;
            margin-bottom: 1rem;
            color: #2c3e50;
        }

        .product-card p {
            color: #7f8c8d;
            margin-bottom: 1.5rem;
        }

        .product-price {
            font-size: 1.3rem;
            font-weight: bold;
            color: #e74c3c;
        }

        /* AI Assistant Section */
        .ai-assistant {
            background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
            color: white;
            padding: 5rem 0;
            text-align: center;
        }

        .ai-chat {
            max-width: 600px;
            margin: 2rem auto;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 15px;
            padding: 2rem;
            backdrop-filter: blur(10px);
        }

        .chat-input {
            width: 100%;
            padding: 1rem;
            border: none;
            border-radius: 25px;
            font-size: 1rem;
            margin-bottom: 1rem;
            background: rgba(255, 255, 255, 0.9);
        }

        .chat-button {
            background: linear-gradient(45deg, #3498db, #2980b9);
            color: white;
            border: none;
            padding: 1rem 2rem;
            border-radius: 25px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .chat-button:hover {
            transform: scale(1.05);
        }

        .chat-response {
            margin-top: 1rem;
            padding: 1rem;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 10px;
            text-align: left;
            display: none;
        }

        /* Footer */
        .footer {
            background: #2c3e50;
            color: white;
            padding: 3rem 0;
            text-align: center;
        }

        .footer-content {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 2rem;
            margin-bottom: 2rem;
        }

        .footer-section h3 {
            margin-bottom: 1rem;
            color: #3498db;
        }

        .footer-section a {
            color: #bdc3c7;
            text-decoration: none;
            display: block;
            margin-bottom: 0.5rem;
            transition: color 0.3s ease;
        }

        .footer-section a:hover {
            color: #3498db;
        }

        /* Mobile Responsive */
        @media (max-width: 768px) {
            .nav-menu {
                display: none;
            }

            .hero h1 {
                font-size: 2.5rem;
            }

            .hero p {
                font-size: 1.1rem;
            }

            .products-grid {
                grid-template-columns: 1fr;
            }
        }

        /* Loading Animation */
        .loading {
            display: inline-block;
            width: 20px;
            height: 20px;
            border: 3px solid rgba(255, 255, 255, 0.3);
            border-radius: 50%;
            border-top-color: #fff;
            animation: spin 1s ease-in-out infinite;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }
    </style>
</head>
<body>
    <!-- Header -->
    <header class="header" id="header">
        <div class="nav-container">
            <div class="logo">
                <i class="fas fa-bolt"></i>
                <span data-zh="电器专家" data-en="ElectroTech Pro">电器专家</span>
            </div>
            <nav>
                <ul class="nav-menu">
                    <li><a href="#home" data-zh="首页" data-en="Home">首页</a></li>
                    <li><a href="#products" data-zh="产品" data-en="Products">产品</a></li>
                    <li><a href="#ai-assistant" data-zh="AI助手" data-en="AI Assistant">AI助手</a></li>
                    <li><a href="#contact" data-zh="联系我们" data-en="Contact">联系我们</a></li>
                </ul>
            </nav>
            <button class="lang-switch" onclick="toggleLanguage()">
                <i class="fas fa-globe"></i> <span id="lang-text">EN</span>
            </button>
        </div>
    </header>

    <!-- Hero Section -->
    <section class="hero" id="home">
        <div class="hero-content">
            <h1 data-zh="专业电器设备解决方案" data-en="Professional Electronics Solutions">专业电器设备解决方案</h1>
            <p data-zh="为您提供最先进的电器设备，结合AI智能推荐，打造完美的用户体验" data-en="Providing cutting-edge electronics with AI-powered recommendations for the perfect user experience">为您提供最先进的电器设备，结合AI智能推荐，打造完美的用户体验</p>
            <a href="#products" class="cta-button" data-zh="探索产品" data-en="Explore Products">探索产品</a>
        </div>
    </section>

    <!-- Products Section -->
    <section class="products" id="products">
        <div class="container">
            <h2 class="section-title" data-zh="精选产品" data-en="Featured Products">精选产品</h2>
            <div class="products-grid">
                <div class="product-card" onclick="showProductDetails('smart-home')">
                    <div class="product-icon">
                        <i class="fas fa-home"></i>
                    </div>
                    <h3 data-zh="智能家居系统" data-en="Smart Home System">智能家居系统</h3>
                    <p data-zh="全套智能家居解决方案，让您的生活更加便捷舒适" data-en="Complete smart home solution for convenient and comfortable living">全套智能家居解决方案，让您的生活更加便捷舒适</p>
                    <div class="product-price">¥15,999</div>
                </div>

                <div class="product-card" onclick="showProductDetails('industrial')">
                    <div class="product-icon">
                        <i class="fas fa-industry"></i>
                    </div>
                    <h3 data-zh="工业自动化设备" data-en="Industrial Automation">工业自动化设备</h3>
                    <p data-zh="高效可靠的工业自动化解决方案，提升生产效率" data-en="Efficient and reliable industrial automation solutions to boost productivity">高效可靠的工业自动化解决方案，提升生产效率</p>
                    <div class="product-price">¥89,999</div>
                </div>

                <div class="product-card" onclick="showProductDetails('medical')">
                    <div class="product-icon">
                        <i class="fas fa-heartbeat"></i>
                    </div>
                    <h3 data-zh="医疗电子设备" data-en="Medical Electronics">医疗电子设备</h3>
                    <p data-zh="精密医疗电子设备，为健康保驾护航" data-en="Precision medical electronics for health protection">精密医疗电子设备，为健康保驾护航</p>
                    <div class="product-price">¥45,999</div>
                </div>

                <div class="product-card" onclick="showProductDetails('security')">
                    <div class="product-icon">
                        <i class="fas fa-shield-alt"></i>
                    </div>
                    <h3 data-zh="安防监控系统" data-en="Security System">安防监控系统</h3>
                    <p data-zh="先进的安防监控解决方案，保障您的安全" data-en="Advanced security monitoring solutions for your safety">先进的安防监控解决方案，保障您的安全</p>
                    <div class="product-price">¥25,999</div>
                </div>
            </div>
        </div>
    </section>

    <!-- AI Assistant Section -->
    <section class="ai-assistant" id="ai-assistant">
        <div class="container">
            <h2 class="section-title" data-zh="AI智能助手" data-en="AI Smart Assistant">AI智能助手</h2>
            <p data-zh="基于DeepSeek AI技术，为您提供专业的产品咨询和推荐服务" data-en="Powered by DeepSeek AI technology, providing professional product consultation and recommendations">基于DeepSeek AI技术，为您提供专业的产品咨询和推荐服务</p>
            
            <div class="ai-chat">
                <input type="text" class="chat-input" id="chatInput" placeholder="请输入您的问题..." data-zh-placeholder="请输入您的问题..." data-en-placeholder="Enter your question...">
                <button class="chat-button" onclick="askAI()" id="chatButton">
                    <span data-zh="咨询AI" data-en="Ask AI">咨询AI</span>
                </button>
                <div class="chat-response" id="chatResponse"></div>
            </div>
        </div>
    </section>

    <!-- Footer -->
    <footer class="footer" id="contact">
        <div class="container">
            <div class="footer-content">
                <div class="footer-section">
                    <h3 data-zh="联系信息" data-en="Contact Info">联系信息</h3>
                    <p><i class="fas fa-phone"></i> +86 400-123-4567</p>
                    <p><i class="fas fa-envelope"></i> info@electrotech.com</p>
                    <p><i class="fas fa-map-marker-alt"></i> <span data-zh="北京市朝阳区科技园" data-en="Beijing Chaoyang Tech Park">北京市朝阳区科技园</span></p>
                </div>
                <div class="footer-section">
                    <h3 data-zh="产品分类" data-en="Product Categories">产品分类</h3>
                    <a href="#" data-zh="智能家居" data-en="Smart Home">智能家居</a>
                    <a href="#" data-zh="工业设备" data-en="Industrial Equipment">工业设备</a>
                    <a href="#" data-zh="医疗器械" data-en="Medical Devices">医疗器械</a>
                    <a href="#" data-zh="安防系统" data-en="Security Systems">安防系统</a>
                </div>
                <div class="footer-section">
                    <h3 data-zh="服务支持" data-en="Support">服务支持</h3>
                    <a href="#" data-zh="技术支持" data-en="Technical Support">技术支持</a>
                    <a href="#" data-zh="售后服务" data-en="After-sales Service">售后服务</a>
                    <a href="#" data-zh="产品保修" data-en="Product Warranty">产品保修</a>
                    <a href="#" data-zh="用户手册" data-en="User Manual">用户手册</a>
                </div>
            </div>
            <div style="border-top: 1px solid #34495e; padding-top: 2rem; margin-top: 2rem;">
                <p>&copy; 2024 ElectroTech Pro. <span data-zh="版权所有" data-en="All rights reserved">版权所有</span></p>
            </div>
        </div>
    </footer>

    <div id="app"></div>
    <script type="module" src="/src/main.js"></script>

    <script>
        let currentLang = 'zh';

        // Language Toggle
        function toggleLanguage() {
            currentLang = currentLang === 'zh' ? 'en' : 'zh';
            updateLanguage();
        }

        function updateLanguage() {
            const elements = document.querySelectorAll('[data-zh][data-en]');
            elements.forEach(element => {
                if (currentLang === 'zh') {
                    element.textContent = element.getAttribute('data-zh');
                } else {
                    element.textContent = element.getAttribute('data-en');
                }
            });

            // Update placeholders
            const placeholderElements = document.querySelectorAll('[data-zh-placeholder][data-en-placeholder]');
            placeholderElements.forEach(element => {
                if (currentLang === 'zh') {
                    element.placeholder = element.getAttribute('data-zh-placeholder');
                } else {
                    element.placeholder = element.getAttribute('data-en-placeholder');
                }
            });

            document.getElementById('lang-text').textContent = currentLang === 'zh' ? 'EN' : '中文';
            document.documentElement.lang = currentLang === 'zh' ? 'zh-CN' : 'en';
        }

        // Header scroll effect
        window.addEventListener('scroll', () => {
            const header = document.getElementById('header');
            if (window.scrollY > 100) {
                header.classList.add('scrolled');
            } else {
                header.classList.remove('scrolled');
            }
        });

        // Smooth scrolling
        document.querySelectorAll('a[href^="#"]').forEach(anchor => {
            anchor.addEventListener('click', function (e) {
                e.preventDefault();
                const target = document.querySelector(this.getAttribute('href'));
                if (target) {
                    target.scrollIntoView({
                        behavior: 'smooth',
                        block: 'start'
                    });
                }
            });
        });

        // Product details
        function showProductDetails(productType) {
            const pages = {
                'smart-home': 'smart-home.html',
                'industrial': 'industrial.html', 
                'medical': 'medical.html',
                'security': 'security.html'
            };
            window.open(pages[productType], '_blank');
        }

        // AI Assistant (Mock DeepSeek Integration)
        async function askAI() {
            const input = document.getElementById('chatInput');
            const button = document.getElementById('chatButton');
            const response = document.getElementById('chatResponse');
            
            if (!input.value.trim()) return;

            // Show loading
            button.innerHTML = '<div class="loading"></div>';
            button.disabled = true;

            // Mock AI response (In real implementation, this would call DeepSeek API)
            setTimeout(() => {
                const responses = {
                    zh: [
                        '根据您的需求，我推荐智能家居系统，它能够为您提供便捷的生活体验。',
                        '我们的工业自动化设备采用最新技术，可以显著提升您的生产效率。',
                        '基于您的预算和需求，医疗电子设备是一个很好的选择。',
                        '安防监控系统能够为您提供全天候的安全保障，支持远程监控。'
                    ],
                    en: [
                        'Based on your needs, I recommend the smart home system for convenient living experience.',
                        'Our industrial automation equipment uses the latest technology to significantly improve your production efficiency.',
                        'Based on your budget and requirements, medical electronics is an excellent choice.',
                        'The security monitoring system provides 24/7 security with remote monitoring support.'
                    ]
                };

                const randomResponse = responses[currentLang][Math.floor(Math.random() * responses[currentLang].length)];
                
                response.innerHTML = `
                    <div style="display: flex; align-items: center; gap: 10px; margin-bottom: 10px;">
                        <i class="fas fa-robot" style="color: #3498db;"></i>
                        <strong>DeepSeek AI:</strong>
                    </div>
                    <p>${randomResponse}</p>
                    <div style="margin-top: 10px; font-size: 0.9em; opacity: 0.8;">
                        ${currentLang === 'zh' ? '如需更详细的咨询，请联系我们的专业团队。' : 'For more detailed consultation, please contact our professional team.'}
                    </div>
                `;
                
                response.style.display = 'block';
                
                // Reset button
                button.innerHTML = `<span data-zh="咨询AI" data-en="Ask AI">${currentLang === 'zh' ? '咨询AI' : 'Ask AI'}</span>`;
                button.disabled = false;
                
                // Clear input
                input.value = '';
            }, 2000);
        }

        // Enter key support for chat
        document.getElementById('chatInput').addEventListener('keypress', function(e) {
            if (e.key === 'Enter') {
                askAI();
            }
        });

        // Initialize page
        document.addEventListener('DOMContentLoaded', function() {
            updateLanguage();
        });
    </script>
</body>
</html>
